import request from '@/utils/request'

// 查询股东变更列表
export function listCompanyHolderChange(query) {
  return request({
    url: '/company/companyHolderChange/list',
    method: 'get',
    params: query
  })
}

// 查询股东变更对比数据
export function getCheckedDataVS(query) {
  return request({
    url: '/company/companyHolderChange/getCheckedDataVS',
    method: 'get',
    params: query
  })
}

// 获取股东结构图所需数据
export function getHolderChart(query) {
  return request({
    url: '/company/companyHolderChange/getHolderChart',
    method: 'get',
    params: query
  })
}

// // 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/company/companyHolderChange/avatar',
    method: 'post',
    data: data
  })
}

// 查询股东变更详细
export function getCompanyHolderChange(id) {
  return request({
    url: '/company/companyHolderChange/' + id,
    method: 'get'
  })
}

// 根据公司ID，获取股东信息
export function getHoldersByCompanyId(companyId) {
  return request({
    url: '/company/companyHolderChange/getHoldersByCompanyId/' + companyId,
    method: 'get'
  })
}

// 查询股东变更详细
export function getNewHolderByCid(query) {
  return request({
    url: '/company/companyHolderChange/getNewHolderByCid',
    method: 'get',
    params: query
  })
}

// 查询股东变更详细
export function getNewHolderByCompanyId(query) {
  return request({
    url: '/company/companyHolderChange/newHolderList',
    method: 'get',
    params: query
  })
}

// 保存股东变更
export function saveCompanyHolderChange(data) {
  return request({
    url: '/company/companyHolderChange/save',
    method: 'post',
    data: data
  })
}

// 删除股东变更
export function delCompanyHolderChange(id) {
  return request({
    url: '/company/companyHolderChange/' + id,
    method: 'delete'
  })
}

// 删除股东信息
export function delHolder(id) {
  return request({
    url: '/company/companyHolderChange/delHolder/' + id,
    method: 'delete'
  })
}

// 导出股东变更
export function exportCompanyHolderChange(query) {
  return request({
    url: '/company/companyHolderChange/export',
    method: 'get',
    params: query
  })
}
